﻿using System;
using rpxnow_library.rpxnowapi.conf;

namespace rpxnow_library.rpxnowapi.requests
{
    static public class ApiFactory
    {
        static public Iapi Create()
        {
            Iapi p = null;

            switch (ApplicationConfiguration.Format)
            {
                case ApplicationConfiguration.MessageFormat.Json:

                    p = new Json();
                    break;

                case ApplicationConfiguration.MessageFormat.Xml:

                    throw new NotImplementedException("Xml message format");
            }

            return p;
        }
    }
}